// --------------
// 作者:Vitity
// --------------

/// <summary>
/// 用于为API控制器提供排序、分组和描述信息
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)]
public class ApiSettingAttribute : Attribute
{
    public ApiSettingAttribute(params string[] groups) : base()
    {
        Groups = groups;
    }

    /// <summary>
    /// API控制器的名称
    /// </summary>
    public string? DisplayName { get; set; }

    /// <summary>
    /// API控制器的排序
    /// </summary>
    public int Order { get; set; } = 0;

    /// <summary>
    /// API控制器的描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// API控制器的分组名称
    /// </summary>
    public string[]? Groups { get; set; } = Array.Empty<string>();
}